<!--addCourse.html-->
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"  lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="/bootstrap/css/bootstrap.min.css"  crossorigin="anonymous">
    <title>添加课程</title>
    <style>
        body {
            display: flex;
            flex-direction: column;
            height: 100vh;
            margin: 0;
            padding: 0;
        }
        .main-container {
            display: flex;
            flex: 1;
        }
        aside {
            width: 190px; /* 左侧菜单宽度 */
            background-color: #171d1d;
        }
        .right-container {
            flex: 1;
            display: flex;
            flex-direction: column;/*除左侧菜单外，整个右半部分以垂直的形式布局*/
            background-color: white;
        }
        header {
            min-height: 60px; /* 头部高度 */
            text-align: center;
            padding: 10px;
            margin-bottom: 25px;
            box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        }
        .content {
            flex: 1;
            padding: 10px;
            overflow-y: auto; /* 主内容区域滚动 */
        }
        footer {
            background-color: #6e7272;
            color: white;
            height: 60px; /* 页脚高度 */
            text-align: center;
            padding: 10px;
            margin-top: 15px;
        }
    </style>
</head>
<body>
<div class="main-container">
    <!-- 左侧菜单 -->
    <aside th:replace="~{/layout/left_menu.html}"></aside>

    <!-- 右侧区域（头部 + 主内容 + 页脚） -->
    <div class="right-container">
        <!-- 头部区域 -->
        <header th:replace="~{/layout/header.html}"></header>

        <!-- 主内容区域 -->
        <div class="content">
            <form action="/Course/add" class="was-validated" method="post">

                <div class="form-group">
                    <label for="name">课程:</label>
                    <input type="text" class="form-control" id="name" placeholder="请输入课程" name="name"  required>
                    <div class="valid-feedback">验证成功！</div>
                    <div class="invalid-feedback">请输入课程！</div>
                </div>
                <button type="submit" class="btn btn-primary">新增课程</button>
            </form>

        </div>

        <!-- 页脚区域 -->
        <footer th:replace="~{/layout/footer.html}"></footer>
    </div>
</div>

<script src="/bootstrap/js/jquery.js"  crossorigin="anonymous"></script>
<script src="/bootstrap/js/bootstrap.bundle.min.js"  crossorigin="anonymous"></script>

</body>
</html>